import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Product/"
import { getBaseUrls } from "@/utils/appUrl.js"
//品牌列表
export function productBrandList(path) {
    return http.get({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductBrand" + path,
    })
}
//tag列表
export function getTagList(path) {
    return http.get({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductTag" + path,
    })
}
//商品分类树列表
export function getProductTypeTree(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductTypeTree",
        data,
    })
}

export function helProductTypePage(data) {
    return http.post({
        url: getBaseUrls().baseUrl + 'api/helProductType/page',
        data,
    })
}

//批发商品列表-带规格
export function getWholeSaleListForSku(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getWholeSaleListForSku",
        data,
    })
}
//获取商品详情
export function getInintProductDetailInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getInintProductDetailInfo",
        data,
    })
}
//获取商品详情
export function getCommentListByProduct(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "getCommentListByProduct",
        data,
    })
}
//获取整体显示设置
export function GetProductDisplay() {
    return http.get({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductDisplay",
    })
}
//扫码添加商品
export function AddScanBuyProductToCar(path) {
    return http.get({
        url: getBaseUrls().baseUrlGuide + serviceName + "AddScanBuyProductToCar" + path,
    })
}

// 获取客户一客一价
export function GetProductSkuPricePage(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductSkuPricePage",
        data
    })
}

// 保存一客一价
export function SaveProductPrice(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "SaveProductPrice",
        data
    })
}

// 删除一客一价
export function DeleteProductSkuPrice(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "DeleteProductSkuPrice",
        data
    })
}

// 计算运费 Api/order/GetOrderPostage